package com.carleasoft.mps.adu.business.org.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.carleasoft.mps.adu.business.org.bean.entity.OrgEntity;
import com.carleasoft.mps.adu.business.org.bean.po.OrgPageQueryPo;
import com.carleasoft.mps.adu.business.org.bean.po.OrgPo;
import com.carleasoft.mps.adu.business.org.bean.vo.OrgDetailVo;
import com.carleasoft.mps.core.user.SortPo;
import com.carleasoft.mps.core.user.UserCacheData;

/**
 * <p>Description: 组织 service</p>
 * @since 2020/4/28
 * @author ztm
 */
public interface OrgService extends IService<OrgEntity>{

    /**
     * 添加组织
     * @param orgPo
     */
    OrgEntity add(OrgPo orgPo);

    /**
     * 根据组织编码删除组织
     * @param orgPo
     */
    Boolean deleteOrgByCode(OrgPo orgPo);

    /**
     * 修改组织
     * @param orgPo
     */
    OrgEntity updateOrgByCode(OrgPo orgPo);

    /**
     * 查询组织列表，支持分页和模糊匹配
     * @param page
     * @param orgPageQueryPo
     * @return 组织列表
     */
    Page<OrgDetailVo> pageQuery(Page page, OrgPageQueryPo orgPageQueryPo);

    /**
     * 组织排序
     * @param sortPo
     * @return
     */
    Boolean updateSort(SortPo sortPo);

}
